package com.smart.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("sys_work")
public class Work {
    @TableId(type = IdType.AUTO)
    private Integer workId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long workUser;
    private Integer workType;
    private Integer workDegree;
    private String workDescribe;
    private String workPhone;
    private Integer workState;
    private String workImg;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date workTime;
}
